package common.jdbc.sql.impl;


import common.jdbc.sql.DBType;
import common.jdbc.sql.SqlAdapter;

/**
 * description
 * @author 达梦数据库
 * @date 2021/9/23 9:36
 */
public class DaMengAdaper extends SqlAdapter {

    @Override
    public String getDriverClass() {
        return "dm.jdbc.driver.DmDriver";
    }

    @Override
    public String getTestSql() {
        return "SELECT 1 FROM DUAL";
    }

    @Override
    public String getUrl(String ip, String port, String dbName) {
        return "jdbc:dm://"+ip+":"+port+"/"+dbName;
    }

    @Override
    public String getDate(String date) {
        return " to_date('"+date+"','yyyy-MM-dd HH24:mi:ss')";
    }

    @Override
    public String getLength(String zdm, String zdcd) {
        return null;
    }

    @Override
    public String getNotLength(String zdm, String zdcd) {
        return null;
    }

    @Override
    public String getDbtype() {
        return DBType.ORACLE.dbName();
    }


}
